package com.meimeixia.pattern.singleton.demo3;

/**
 * @author: t-zhijiang.zhao
 * @date: 2024/11/26 上午9:07
 */
public class Client2 {
    public static void main(String[] args) {
        Singleton2 instance = Singleton2.getInstance();
        Singleton2 instance1 = Singleton2.getInstance();

        // 判断两次获取到的Singleton对象是否是同一个对象
        System.out.println(instance == instance1); //true
    }
}
